/**
 * 功能：
 * 	使视图与相关事件相分离
 *  类似于action 用来传递数据和控制视图
 */
Ext.define('Risk.controller.AppController',{
	extend : 'Ext.app.Controller',
	 stores: [
	          'areaStore.TypeStore'
	      ],
	models: [
	       
	      ],
	      
	      /**
	       * 视图在congtroller中进行注册
	       * 将控制权转交给 this Controller
	       */
	  	  //管理的视图
     views: [
           'Risk.view.window.Area',
           'Risk.view.window.Project',
           'window.alert'
            ],
    // 类创建好后要做的初始化工作
	init : function() {
//	  console.log('Initialized Users! This happens before the Application launch function is called');
	  this.control({
		  //类似于JQuery中的选择器
		  'viewport > panel':{
			  render: this.onPanelShow,
			  resize: this.sizeChange
		  }
	  });
	},
	
	onPanelShow :function(){
//		console.log('The panel was rendered!');
	},
	sizeChange :function(obj){
		
//		console.log('The panel size was changed!');
	}
	
});